<?php
require_once "config.php";
$offer_obj = new Offer();
$active_offers = $offer_obj->list_active_offers();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hotels With Offers</title>
<script language="Javascript" type="text/javascript" src="js/jquery-1.4.1.js"></script>
<script language="Javascript" type="text/javascript" src="js/jquery.lwtCountdown-1.0.js"></script>
<script language="Javascript" type="text/javascript" src="js/misc.js"></script>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="wrapper">
<?php require_once 'top_header.php'; ?>
    
<div class="contentPane">
  <div id="sidebar">
    <span class="menu"><img src="images/call.png" alt="Advertise with Hotel with Offers" class="callus"  /></span>
    <div class="joinus">
      <h1>INVITE A FRIEND</h1>
      <h2>Tell a friend and win Rs100.00</h2>
      <div class="joinbtn"><a href="#">LEARN&nbsp;MORE</a></div>
     </div>
    <div class="reserve"><span class="reserveitem">Reserved for :</span> <span class="reserveitem">advertising</span> <span class="reserveitem">latest news</span> <span class="reserveitem">soon ending deals &amp; offers</span></div>
  </div>
  <div class="leftPane">
      <div class="mainMenu"><?php require_once 'main_menu.php'; ?></div>
    <?php require_once 'newsletter_plug.php'; ?>
    <br class="clear">
    <div class="cart">
      <h2>My account</h2>
      <div id="TabbedPanels1" class="TabbedPanels">
        <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0">Special Offers</li>
          <li class="TabbedPanelsTab" tabindex="0">Vouchers</li>
          <li class="TabbedPanelsTab" tabindex="0">Purchase History</li>
          <li class="TabbedPanelsTab" tabindex="0">Edit Account Info</li>
          <li class="TabbedPanelsTab" tabindex="0">Post your Listing FREE</li>
          <li class="TabbedPanelsTab" tabindex="0">Advertise</li>
        </ul>
        <div class="TabbedPanelsContentGroup">
          <div class="TabbedPanelsContent">
            <p>We can display a couple of special offers/news.          </p>
          </div>
          <div class="TabbedPanelsContent">
            <p>List of vouchers coming soon          </p>
          </div>
          <div class="TabbedPanelsContent">
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear">
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
            <div class="purchaseHistory">
              <div class="listingInfo">Kandalama 6 Days 7 Nights  - LKR 98,000</div>
              <div class="date">7 Jan 2012</div>
              <br class="clear" />
            </div>
          </div>
          <div class="TabbedPanelsContent">
            <div class="editAccount">
              <ul id="editAccountMenu">
                <li><a href="#">Update Info</a></li>
                <li><a href="#">Update Password</a></li>
                <li><a href="#">Subscribe to Newsletters</a></li>
              </ul>
<p>First Name : John</p>
              <p>Last Name : Smith</p>
              <p>Email : jsmith@hotelswithoffers.com</p>
              <p>Phone : 117318319</p>
              <p>Mobile : Not Available</p>
              <p>Email Alerts (New offers &amp; Newsletters)  :Subscribed            </p>
            </div>
          </div>
          <div class="TabbedPanelsContent">
            <p>Please fill in your listing details. </p>
</div>
          <div class="TabbedPanelsContent">
            <p>Promote your hotel or tour packags. Advertise with us now! </p>
            <p>Please select the banner type below and submit the request. We will be in touch with you.</p>
          </div>
        </div>
        </div>
  <br class="clear">
</div>
<div class="clear"></div>
</div>
</div>
<div class="clear"></div>
</div>
<div id="footerWrapper">
<?php require_once 'footer.php'; ?>
</div>
    <script language="javascript" type="text/javascript">
jQuery(document).ready(function() {
                            <?php $k = 1;
                                foreach ($active_offers as $active_offer) {
                                    $offer_hour = substr($active_offer['offer_end_date'], 11, 2) ;
               $offer_min =  substr($active_offer['offer_end_date'], 14, 2);
               $offer_sec =  substr($active_offer['offer_end_date'], 17, 2);
               $offer_day =  substr($active_offer['offer_end_date'], 8, 2);
               $offer_month =  substr($active_offer['offer_end_date'], 5, 2);
               $offer_year =  substr($active_offer['offer_end_date'], 0, 4);

                            ?>
				$('#countdown_dashboard<?=$k?>').countDown({
					targetDate: {
						'day': 		<?=$offer_day?>,
						'month': 	<?=$offer_month?>,
						'year': 	<?=$offer_year?>,
						'hour': 	<?=$offer_hour?>,
						'min': 		<?=$offer_min?>,
						'sec': 		<?=$offer_sec?>
					}
				});
                                

				<?php $k++; } ?>

			});
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
</body>
</html>
